<?php /* Smarty version Smarty-3.1.15, created on 2016-10-10 11:12:46
         compiled from "D:\Program Files (x86)\USBWebserver v8.6\root\jh_source\admin\track\include\template\one_page_shop\add_small.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2560357e2467f40f070-77376649%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '553e0bd084596f437c39a0135c82b39b279968c6' => 
    array (
      0 => 'D:\\Program Files (x86)\\USBWebserver v8.6\\root\\jh_source\\admin\\track\\include\\template\\one_page_shop\\add_small.tpl',
      1 => 1476069064,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2560357e2467f40f070-77376649',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_57e2467f4322f9_73441559',
  'variables' => 
  array (
    'osadmin_action_alert' => 0,
    'osadmin_quick_note' => 0,
    'pid' => 0,
    'model' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_57e2467f4322f9_73441559')) {function content_57e2467f4322f9_73441559($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!-- START 以上内容不需更改，保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->tpl_vars['osadmin_action_alert']->value;?>

<?php echo $_smarty_tpl->tpl_vars['osadmin_quick_note']->value;?>


<div style="display:none">
    <script type="text/javascript" charset="utf-8" src="<?php echo @constant('ADMIN_URL');?>
/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8"
            src="<?php echo @constant('ADMIN_URL');?>
/ueditor/ueditor.all.min.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8"
            src="<?php echo @constant('ADMIN_URL');?>
/ueditor/lang/zh-cn/zh-cn.js"></script>

    <style type="text/css">
        div {
            line-height: 40px;
        }

        .bjq {
            margin-left: 160px;

        }

        .btn {
            margin-left: 160px;
        }
    </style>
</div>

<div id="myTabContent" class="tab-content">
    <div class="tab-pane active in" id="home">
        <form id="tab" method="post" action="product_add_small.php">
            <?php if ($_smarty_tpl->tpl_vars['pid']->value!='') {?>
            <label>产品ID</label>
        <input type="text" name="products_id" value="<?php echo $_smarty_tpl->tpl_vars['pid']->value;?>
" class="input-xlarge" required="true"
               autofocus="true" readonly="readonly">

            <label>型号</label>
        <input type="text" name="products_model" value="<?php echo $_smarty_tpl->tpl_vars['model']->value;?>
" class="input-xlarge" required="true"
               autofocus="true" readonly="readonly">

            <label>产品缩略图</label>
            <textarea name="uploadfile" rows="10" class="input-xlarge" placeholder="只能填写一个地址"></textarea>

            <?php } else { ?>
            <label>产品ID</label>
        <input type="text" name="products_id" value="" class="input-xlarge" required="true"
               autofocus="true" >

            <label>型号</label>
        <input type="text" name="products_model" value="" class="input-xlarge" required="true"
               autofocus="true" >
            <label>产品缩略图</label>

            <textarea name="uploadfile" rows="10" class="input-xlarge" placeholder="只能填写一个地址"></textarea>

            <?php }?>

            <div class="btn-toolbar">
                <button type="submit" class="btn btn-primary"><strong>提交</strong></button>
            </div>
        </form>
    </div>
</div>

<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');


    function isFocus(e) {
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e) {
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }
    function getAllHtml() {
        alert(UE.getEditor('editor').getAllHtml())
    }
    function getContent() {
        var arr = [];
        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getContent());
        alert(arr.join("\n"));
    }
    function getPlainTxt() {
        var arr = [];
        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getPlainTxt());
        alert(arr.join('\n'))
    }
    function setContent(isAppendTo) {
        var arr = [];
        arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
        UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
        alert(arr.join("\n"));
    }
    function setDisabled() {
        UE.getEditor('editor').setDisabled('fullscreen');
        disableBtn("enable");
    }

    function setEnabled() {
        UE.getEditor('editor').setEnabled();
        enableBtn();
    }

    function getText() {
        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
        var range = UE.getEditor('editor').selection.getRange();
        range.select();
        var txt = UE.getEditor('editor').selection.getText();
        alert(txt)
    }

    function getContentTxt() {
        var arr = [];
        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
        arr.push("编辑器的纯文本内容为：");
        arr.push(UE.getEditor('editor').getContentTxt());
        alert(arr.join("\n"));
    }
    function hasContent() {
        var arr = [];
        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
        arr.push("判断结果为：");
        arr.push(UE.getEditor('editor').hasContents());
        alert(arr.join("\n"));
    }
    function setFocus() {
        UE.getEditor('editor').focus();
    }
    function deleteEditor() {
        disableBtn();
        UE.getEditor('editor').destroy();
    }
    function disableBtn(str) {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            if (btn.id == str) {
                UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
            } else {
                btn.setAttribute("disabled", "true");
            }
        }
    }
    function enableBtn() {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
        }
    }

    function getLocalData() {
        alert(UE.getEditor('editor').execCommand("getlocaldata"));
    }

    function clearLocalData() {
        UE.getEditor('editor').execCommand("clearlocaldata");
        alert("已清空草稿箱")
    }
</script>
<!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
